package com.ruoyi.be.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.be.mapper.MyMedicalCpoeSplitbedMapper;
import com.ruoyi.be.domain.MyMedicalCpoeSplitbed;
import com.ruoyi.be.service.IMyMedicalCpoeSplitbedService;

/**
 * 分床记录Service业务层处理
 * 
 * @author ly
 * @date 2022-01-05
 */
@Service
public class MyMedicalCpoeSplitbedServiceImpl implements IMyMedicalCpoeSplitbedService 
{
    @Autowired
    private MyMedicalCpoeSplitbedMapper myMedicalCpoeSplitbedMapper;

    /**
     * 查询分床记录
     * 
     * @param id 分床记录主键
     * @return 分床记录
     */
    @Override
    public MyMedicalCpoeSplitbed selectMyMedicalCpoeSplitbedById(String id)
    {
        return myMedicalCpoeSplitbedMapper.selectMyMedicalCpoeSplitbedById(id);
    }

    /**
     * 查询分床记录列表
     * 
     * @param myMedicalCpoeSplitbed 分床记录
     * @return 分床记录
     */
    @Override
    public List<MyMedicalCpoeSplitbed> selectMyMedicalCpoeSplitbedList(MyMedicalCpoeSplitbed myMedicalCpoeSplitbed)
    {
        return myMedicalCpoeSplitbedMapper.selectMyMedicalCpoeSplitbedList(myMedicalCpoeSplitbed);
    }

    /**
     * 新增分床记录
     * 
     * @param myMedicalCpoeSplitbed 分床记录
     * @return 结果
     */
    @Override
    public int insertMyMedicalCpoeSplitbed(MyMedicalCpoeSplitbed myMedicalCpoeSplitbed)
    {
        myMedicalCpoeSplitbed.setCreateTime(DateUtils.getNowDate());
        return myMedicalCpoeSplitbedMapper.insertMyMedicalCpoeSplitbed(myMedicalCpoeSplitbed);
    }

    /**
     * 修改分床记录
     * 
     * @param myMedicalCpoeSplitbed 分床记录
     * @return 结果
     */
    @Override
    public int updateMyMedicalCpoeSplitbed(MyMedicalCpoeSplitbed myMedicalCpoeSplitbed)
    {
        return myMedicalCpoeSplitbedMapper.updateMyMedicalCpoeSplitbed(myMedicalCpoeSplitbed);
    }

    /**
     * 批量删除分床记录
     * 
     * @param ids 需要删除的分床记录主键
     * @return 结果
     */
    @Override
    public int deleteMyMedicalCpoeSplitbedByIds(String[] ids)
    {
        return myMedicalCpoeSplitbedMapper.deleteMyMedicalCpoeSplitbedByIds(ids);
    }

    /**
     * 删除分床记录信息
     * 
     * @param id 分床记录主键
     * @return 结果
     */
    @Override
    public int deleteMyMedicalCpoeSplitbedById(String id)
    {
        return myMedicalCpoeSplitbedMapper.deleteMyMedicalCpoeSplitbedById(id);
    }

    @Override
    public List<MyMedicalCpoeSplitbed> selectMyMedicalCpoeSplitbedbybedId(String bedId) {
        return myMedicalCpoeSplitbedMapper.selectMyMedicalCpoeSplitbedbybedId(bedId);
    }
}
